<?php

namespace App\Admin\Actions\Grid\User;

use App\Admin\Forms\User\DeductionForm;
use Dcat\Admin\Grid\RowAction;
use Dcat\Admin\Widgets\Modal;

class Deduction extends RowAction
{
    /**
     * @return string
     */
	protected $title = '扣款';

    public function render()
    {
        $form = DeductionForm::make()->payload([
            'id' => $this->getKey()
        ]);
        return Modal::make()
            ->lg()
            ->title($this->title)
            ->body($form)
            ->button('<a href="javascript:void(0)"><i class="fa fa-dollar"> ' . $this->title . '</i></a>');
    }

}
